Web Services for Remote Management  14.0
Reference documentation for web service interfaces to support remote management of Symantec Endpoint Protection
List of all members | Static Public Member Functions
com.symantec.sepm.webservice.common.exception.ExceptionTranslator Class Reference

Contains static methods for converting various exceptions to web service layer exceptions that can be sent back to a web service client. More...

Static Public Member Functions

static void translateAndThrowException (Throwable t) throws InvalidArgumentServiceException, InsufficientAccessServiceException, ServiceException
 This method takes any Throwable exception and converts it to a web service declared public exception type. More...
 
static void translateAndThrowExceptionForNonArgumentMethod (Throwable t) throws InsufficientAccessServiceException, ServiceException
 This method takes any Throwable exception and converts it to a web service declared public exception type. More...
 

Detailed Description

Contains static methods for converting various exceptions to web service layer exceptions that can be sent back to a web service client.

Member Function Documentation

static void com.symantec.sepm.webservice.common.exception.ExceptionTranslator.translateAndThrowException ( Throwable  t) throws InvalidArgumentServiceException, InsufficientAccessServiceException, ServiceException
static

This method takes any Throwable exception and converts it to a web service declared public exception type.

This method always throws an exception. If the specific exception type is a runtime exception or cannot be determined, a ServiceException is thrown.

Parameters
tthe original throwable exception
Exceptions
InvalidArgumentServiceExceptionif the input is an instance of InvalidArgumentServiceException or InvalidArgumentException
InsufficientAccessServiceExceptionif the input is an instance of InsufficientAccessServiceException
ServiceExceptionif the input is an instance of ServiceException, or any other type of exception
static void com.symantec.sepm.webservice.common.exception.ExceptionTranslator.translateAndThrowExceptionForNonArgumentMethod ( Throwable  t) throws InsufficientAccessServiceException, ServiceException
static

This method takes any Throwable exception and converts it to a web service declared public exception type.

Unlike translateAndThrowException, this method should not handle InvalidArgumentServiceException or InvalidArgumentException, because it is designed for use with methods that do not have arguments. If either InvalidArgumentServiceException or InvalidArgumentException is passed, a ServiceException is thrown.

This method will always throw an exception. If the specific exception type is a runtime exception, InvalidArgumentServiceException or InvalidArgumentException, or cannot be determined, a ServiceException is thrown.

Parameters
tthe original throwable exception
Exceptions
InsufficientAccessServiceExceptionif the input is an instance of InsufficientAccessServiceException
ServiceExceptionif the input is an instance of ServiceException, or any other type of exception
See also
translateAndThrowException(Throwable) translateAndThrowException